/*
 * Logger.h
 *
 *  Created on: 05-08-2011
 *      Author: cristian
 */

#ifndef LOGGER_H_
#define LOGGER_H_
using namespace std;

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sys/time.h>
#include <string.h>
#include <stdarg.h>

/* ANSI Colors */
#define ANSI_BOLD "\033[1m"
#define ANSI_CYAN "\033[36m"
#define ANSI_MAGENTA "\033[35m"
#define ANSI_RED "\033[31m"
#define ANSI_YELLOW "\033[33m"
#define ANSI_BLUE "\033[34m"
#define ANSI_GREEN "\033[32m"
#define ANSI_WHITE "\033[37m"
#define ANSI_RESET "\033[0m"

#define TRACE_CORE 0
#define TRACE_PLUGIN 1
#define TRACE_COMP_CORE "core"

#define HAL_TRACE(logger, ...) { \
	logger->hal_trace(TRACE_COMP_CORE, TRACE_CORE, \
                                     __FUNCTION__, __FILE__, __LINE__,  __VA_ARGS__) ;\
			}

class Logger {

private:
public:
	static int init_time;
	Logger();
	virtual ~Logger();
	void hal_trace(const char *component, int color, const char *function,
			const char *file, int line, const char* format, ...);

		};

#endif /* LOGGER_H_ */
